Jonas Dreßler [Wed, 22 Jan 2020 19:53:34 +0000 (20:53 +0100)]
st/entry: Show hint actor while entry is focused
Also show the hint actor of an StEntry while the entry is focused but
has no text inside it. This is part of the new dialog and lock-screen
design where there are no labels before entries anymore and labels are
instead shown as a hint-text of the entry.
Sebastian Keller [Wed, 22 Jan 2020 22:34:23 +0000 (23:34 +0100)]
st/icon: Fix GIcon leak in set_fallback_icon_name
set_fallback_icon_name() leaks a GIcon by using the set_icon method
which adds a ref to the GIcon without removing its own ref after calling
the method.
Related to https://gitlab.gnome.org/GNOME/gnome-shell/issues/2146
Florian Müllner [Fri, 17 Jan 2020 16:26:08 +0000 (17:26 +0100)]
dateMenu: Indicate when do-not-disturb is on
When do-not-disturb is enabled, non-critical notifications will not
be shown as banners. It therefore makes sense to indicate that state
to the user, so they don't accidentally miss notifications.
Florian Müllner [Tue, 21 Jan 2020 15:36:56 +0000 (16:36 +0100)]
dateMenu: Bind pad visibility to indicator
Currently the indicator pad requests a size of 0x0 if the corresponding
indicator is hidden. Right now this is enough to balance out the indicator,
but it won't be when we add spacing to the parent container.
Properly hide the pad with the indicator to avoid that issue.
Florian Müllner [Fri, 4 May 2018 15:55:29 +0000 (17:55 +0200)]
calendar: Add "Do Not Disturb" switch
We've had the ability to temporarily disable notification banners
all the way back to 3.0, but we stopped exposing it in the UI with
the 3.16 notification redesign. With the message list being more
concise nowadays and the "Clear" button reduced to a single icon,
we now have space for a "Do Not Disturb" switch again.
Carlos Garnacho [Tue, 21 Jan 2020 16:01:56 +0000 (17:01 +0100)]
keyboard: Avoid blank space in OSK panel on portrait layouts
We try to make the OSK 1/3rd as big as the monitor. On landscape
layouts we usually get away with it as there's plenty of horizontal
space to enlarge the OSK while keeping the OSK aspect ratio.
In portrait layout, the horizontal space is a lot more scarce so
it means we'll still have plenty of space after making the OSK as
wide as it can possibly be, which will look as odd blank space in
the OSK panel.
In order to fix this, let the OSK panel height be less than 1/3rd
the monitor size if we are dealing with portrait layouts.
Carlos Garnacho [Tue, 21 Jan 2020 15:35:07 +0000 (16:35 +0100)]
keyboard: Do not reset to initial page on unmap
It will happen before next map anyway, and most notably at times
actor sizes produce correct results.
Fixes oddities in emoji pager visibility after showing the emoji
panel, moving to another page, and hiding the OSK with the downward
arrow button. The next time the emoji panel would be shown, panels
had a chance to remain invisible.
Carlos Garnacho [Tue, 21 Jan 2020 15:33:28 +0000 (16:33 +0100)]
keyboard: Do not set the initial page on construction
It is already scheduled to be set on first map. Doing so here triggers
size and theme node checks the actor tree is not ready for, as the
toplevel actor is not yet attached to the stage.
This functionality always suffered from discoveribility
problems, and now that the folder dialog can rename the
app folders, there's just no reason to keep it.
Make the AppFolderPopup behave much more like a dialog than a
popup itself. To do that, remove the BoxPointer and replace it
by a StBoxLayout. The dialog is is also bind-constrained to the
view selector.
St has the regular abstractions to handle actors that are bigger
than their parent could handle: StScrollable, StScrollView, and
StAdjustment.
However, the only StScrollable implementation available currently
is StBoxLayout, which forces a ClutterBoxLayout as the layout
manager (and relies on it not being unset).
Introduce StViewport, which is a minimal StScrollable implementation
that doesn't rely on any specific layout manager.
Jonas Dreßler [Fri, 17 Jan 2020 13:05:49 +0000 (14:05 +0100)]
dialog: Add a ListSection and ListSectionItem
According to the mockups, add a generic ListSection and ListSectionItem
for dialogs. To add items (like a ListSectionItem) to a section,
ListSection exposes a public ListSection.list actor.
See https://gitlab.gnome.org/GNOME/gnome-shell/issues/1343
Jonas Dreßler [Sun, 19 Jan 2020 17:01:57 +0000 (18:01 +0100)]
lightbox: Change vignette brightness to 0.5
Since the overview search results now have a dark background layer, we
can brighten the background image a bit again. As a factor we use 0.5,
since that ensures the texts in the IconGrid are still readable and the
background image is visible, too.
Andre Klapper [Sat, 18 Jan 2020 13:04:16 +0000 (14:04 +0100)]
Remove two line breaks to make comments for translators get displayed
A comment for translators must *immediately* precede a message:
https://wiki.gnome.org/TranslationProject/DevGuidelines/Use%20comments
These two comments were previously not displayed in any po files.
Jonas Dreßler [Sun, 6 May 2018 15:17:33 +0000 (17:17 +0200)]
altTab: Don't return from _init() if there are no windows/apps
If a new SwitcherPopup is created and there are no windows or apps to
switch through found, instead of returning from _init(), still
initialize the SwitcherPopup and let the check in SwitcherPopup.show()
return false to terminate the popup.
In both cases, with or without the return statements,
WindowManager._startSwitcher() will call SwicherPopup.destroy(), which
will try to disconnect signal handlers, destroy actors etc. Now if the
constructor can't finish creating the popup, some of the functions
called from _onDestroy() will fail and throw errors.
One of those cases is when window-switcher is limited to the current
workspace, and a WindowCyclerPopup is initiated on an empty workspace.
Because this._highlight hasn't been created, _onDestroy() will fail when
trying to destroy the actor of this._highlight.
Also, the actor of this._switcherList will not get destroyed in case
show() returns because this._items is empty. For example, this will
happen when a new AppSwitcherPopup is initialized with at least 1
running app, but 0 windows on the active workspace.
Jonas Dreßler [Sat, 5 May 2018 13:32:16 +0000 (15:32 +0200)]
altTab: Rename List* classes to Switcher*
Calling those classes ThumbnailSwitcher and WindowSwitcher makes more
sense since we are using this naming scheme for all classes extending
SwitcherPopup.SwitcherList.
nana-4 [Fri, 17 Jan 2020 10:57:42 +0000 (19:57 +0900)]
theme: Regain focus ring in %bubble_button
Instead of removing all button shadows forcibly with
`box-shadow: none !important`, remove only the drop shadows selectively
with button(). This allows %bubble_button to preserve the focus ring
while eliminating the drop shadows.
nana-4 [Tue, 14 Jan 2020 18:09:03 +0000 (03:09 +0900)]
theme: Improve button styling
- Move the more generic %button style before %bubble_button to reduce
ugly overrides.
- Remove sizing factors from _drawing.scss to reduce ugly !importants.
- Make the %bubble_button style more consistent.
- Add missing focus styling to %notification_bubble.
nana-4 [Sun, 12 Jan 2020 07:22:59 +0000 (16:22 +0900)]
theme: Remove invalid button styling
There is no ".message-list-clear-button .button" selector, but
".message-list-clear-button.button". To make it clear, this commit adds
.button to .message-list-clear-button.
Jonas Dreßler [Sun, 8 Dec 2019 20:56:46 +0000 (21:56 +0100)]
shellEntry: Show popup menu at cursor position when pressing menu key
When pressing the menu key to show the popupMenu inside a ShellEntry,
the menu is currently aligned with the end of the entered text, this
causes a bug in case the text is overflowing the width of the entry: The
menu will be shown outside of the entry field, because it's aligned with
the (invisible) end of the text.
Fix that by simply aligning the popup menu with the cursor of the entry,
which is a behavior that makes sense when pressing the menu-key anyway.
Jonas Dreßler [Mon, 13 Jan 2020 14:13:53 +0000 (15:13 +0100)]
dialog: Update the layout of dialogs according to the new design
According to the new dialog mockups, update the dialogs paddings and
spacings. Also change the font-weigth of the title to 800 and the
font-size to 18pt, this will make the headings of some dialogs ellipsize
because they contain too much text, we'll have to fix this in subsequent
commits.
See https://gitlab.gnome.org/GNOME/gnome-shell/issues/1343
Jonas Dreßler [Thu, 5 Dec 2019 09:55:00 +0000 (10:55 +0100)]
dialog: Remove messageBox container from MessageDialogContent
`MessageDialogContent.messageBox` is not really needed and was only
needed to show icons, which is now no longer supported. The styling can
also be done using other CSS classes and this makes it a bit more
straightforward to add actors to the MessageDialogContent.
Jonas Dreßler [Mon, 13 Jan 2020 12:44:17 +0000 (13:44 +0100)]
js: Move dialog parts out of messageBox
Since MessageDialogContent.messageBox is going to be removed in a
subsequent commit, move the parts where it's used out of messageBox and
into the contentLayout instead. This will introduce wrong spacings in
some dialogs, which we're going to fix when implementing the redesigned
individual dialogs.
Jonas Dreßler [Thu, 21 Nov 2019 09:04:12 +0000 (16:04 +0700)]
status/network: Compare icon name to NULL instead of empty string
Since the last commit we set the gicon property of StIcon to NULL if an
empty string was given when setting the icon name, this means
`st_icon_get_icon_name()` will return NULL instead of an empty string.
When `getIndicatorIcon()` returns an empty string, the icon_name
property will now be set to NULL, so compare it to NULL here.
Jonas Dreßler [Thu, 21 Nov 2019 12:05:11 +0000 (19:05 +0700)]
st/icon: Check icon name for empty string in setter function
Don't try to create a GIcon if the given icon name is empty, it will
lead to failure when loading the icon anyway, instead set the gicon to
NULL just as we do in the `set_gicon()` API when unsetting an icon.
Jonas Dreßler [Thu, 21 Nov 2019 09:56:13 +0000 (16:56 +0700)]
st/icon: Reorder header file
The order of the functions is currently quite messy, change the order of
the headers so it makes more sense and correct a wrong argument name
while at it.
Daniel van Vugt [Fri, 10 Jan 2020 09:37:26 +0000 (17:37 +0800)]
iconGrid.js: Animate icon spring using translation
Animating the icon spring using the `translation-x/y` properties instead
of the `x/y` properties avoids relayouts. There are still other non-icon
actors moving, but it's a big improvement.
Before: 595 relayouts per spring
After: 94 relayouts per spring
Reducing relayouts reduces reallocation, which reduces CPU-intensive
JavaScript execution.
Florian Müllner [Fri, 10 Jan 2020 18:26:05 +0000 (19:26 +0100)]
screenshot: Fix stripping suffix from relative filename
String.prototype.substr() doesn't support a negative length value
(to subtract from the full length), so we end up with a filename
of '' when hitting that code paths (a relative filename with '.png'
suffix).
Fix this by switching to String.prototype.replace() instead.
Florian Müllner [Fri, 10 Jan 2020 15:09:48 +0000 (16:09 +0100)]
screenShield: Fix showing shield without animation
Commit 24e631ffe2 changed the shield animation to use translation
instead of position.
However once the shield is raised, only an animation will lower it
again, which means the shield is missing when it's supposed to be
shown without animation (for example after an idle blank).
Fix this by resetting the translation-y property in that case.
The brightness property of ShellBlurEffect is of float type, but
we are calling g_value_set_int() in the GObject::get_property()
handler, which throws warnings when trying to set the property
via g_object_set() and family.
Florian Müllner [Wed, 18 Dec 2019 23:45:17 +0000 (00:45 +0100)]
dateMenu: Tweak temperature labels
Together with the forecast icon, the temperature label is the most
important information in the weather section. To emphasize it more,
reduce its space requirement by removing the temperature unit, then
make the text bold.
Jakub Steiner [Wed, 8 Jan 2020 10:08:14 +0000 (11:08 +0100)]
theme: fix HC after refactoring
- panel fg color was derived from bg color. Not a good idea as it's not
just light/drk, but HC as well.
- deriving from dark theme means contrast for things like popover items
is better.